package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author 黑马程序员
 * @Company http://www.ithiema.com
 * @Version 1.0
 */
public interface UserDao {

    SysUser findByUsername(String username);

    void addUser(SysUser sysUser);

    void setRelation(Integer userId, Integer roleId);

    Page<Map<String,Object>> findByCondition(@Param("queryString") String queryString);

    Map<String, Object> findUserById(Integer id);

    List<Integer> findroleIdsByUserId(Integer userId);

    void delRelation(Integer id);

    void edit(SysUser sysUser);

    void delUserById(Integer id);
}
